<template>
  <div>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix" ref="form" :model="chabuForm">
        <el-row>
          <el-col :span="2">
            <span>查询文档</span>
          </el-col>
        </el-row>
      </div>
      <div>
        <el-form size="mini">
          <el-row>
            <el-col :span="4">
              <span>文档名称</span>
            </el-col>
            <el-col :span="4">
              <el-input v-model="chabuForm.wenName" size="mini"></el-input>
            </el-col>
            <el-col :span="2">
              <span>录入时间</span>
            </el-col>
            <el-col :span="6">
              <el-date-picker
                v-model="chabuForm.begintime"
                type="date"
                placeholder="开始日期"
                size="mini"
                style="width: 120px;"
              ></el-date-picker>—
              <el-date-picker
                v-model="chabuForm.endtime"
                type="date"
                placeholder="结束日期"
                size="mini"
                style="width: 120px;"
              ></el-date-picker>
            </el-col>
            <el-button type="mini" @click="submitForm()">查询</el-button>
          </el-row>
        </el-form>
      </div>
    </el-card>
    <br />
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix" ref="form" :model="chabuForm">
        <el-row>
          <el-col :span="2">
            <span>客户列表信息</span>
          </el-col>
        </el-row>
      </div>
      <div>
        <el-table :data="kehuData" border style="width: 100%">
          <el-table-column fixed prop="fileId" label="序号"></el-table-column>
          <el-table-column prop="fileName" label="文件名"></el-table-column>
          <el-table-column prop="uploadTime" label="上传时间"></el-table-column>
          <el-table-column prop="fileSize" label="文件大小"></el-table-column>
          <el-table-column prop="fileType" label="文件类型"></el-table-column>
          <el-table-column  label="用户">ABCD</el-table-column>
          <el-table-column prop="uploadTime" label="录入时间"></el-table-column>
          <el-table-column prop="dustomerSerialNum" label="客户"></el-table-column>
          <el-table-column fixed="right" label="操作" width="90">
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
              <el-button type="text" size="small">编辑</el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination
          @size-change="shujuxian"
          @current-change="shujuxian"
          :current-page.sync="pageIndex"
          :page-sizes="[3, 5, 7, 9]"
          :page-size.sync="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="4"
        ></el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      chabuForm: {
        wenName: "",
        beginTime: "",
        endTime: ""
      },
      kehuData: [],
      pageIndex: 1,
      pageSize: 3,
      totalCount: 0
    };
  },
  created() {
    //  this.loginUserName = this.$cookieTools.getLoginUser().user_name;
    this.shujuxian();
  },
  methods: {
    shujuxian() {
      this.$myaxios(
        "CustomerInput/AccessoryDtoInquire?pageIndex=" +
          this.pageIndex +
          "&pageSize=" +
          this.pageSize +
          "&wenName=" +
          this.chabuForm.wenName +
          "&beginTime=" +
          this.chabuForm.beginTime +
          "&endTime=" +
          this.chabuForm.endTime
      ).then(r => {
        this.kehuData = r.data;
        // this.totalCount=r.data.data.length;
      });
    },
    submitForm() {
      this.shujuxian();
    }
  }
};
</script>

<style>
</style>